package 线程.综合练习.抢红包;

public class text {
    public static void main(String[] args) {
        //创建5个抢红包的对象
        MyMonth mm1=new MyMonth();
        MyMonth mm2=new MyMonth();
        MyMonth mm3=new MyMonth();
        MyMonth mm4=new MyMonth();
        MyMonth mm5=new MyMonth();

        //设置名字
        mm1.setName("喜羊羊");
        mm2.setName("美羊羊");
        mm3.setName("懒羊羊");
        mm4.setName("红太狼");
        mm5.setName("灰太狼");

        //启动线程
        mm1.start();
        mm2.start();
        mm3.start();
        mm4.start();
        mm5.start();
    }
}
